package io.bitmax.library.core;

import android.app.Application;

import java.util.concurrent.Executor;

/**
 * Created by gongdongyang on 2018/9/17.
 */

public class BaseCoreApplication extends Application {

    private static BaseCoreApplication _instance;
    @Override
    public void onCreate() {
        super.onCreate();
        _instance = this;
    }

    public static  BaseCoreApplication getInstance() {
        return _instance;
    }

    /**
     * 所有的新建线程，不要直接new thread，使用此线程池来做执行
     *
     * @return
     */
    public Executor getExecutor() {
        return AsyncTask.THREAD_POOL_EXECUTOR;
    }

}
